package com.ruoyi.system.domain.xcx;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 微信小程序用户对象 app_user
 *
 * @author ruoyi
 * @date 2023-11-03
 */
public class AppUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long id;

    /** 用户的微信唯一标识 */
    @Excel(name = "用户的微信唯一标识")
    private String openid;

    /** 账户余额 */
    @Excel(name = "账户余额")
    private BigDecimal accountBlance;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickname;

    /** 用户头像URL */
    @Excel(name = "用户头像URL")
    private String avatar;

    /** 用户性别，0表示未知，1表示男性，2表示女性 */
    @Excel(name = "用户性别，0表示未知，1表示男性，2表示女性")
    private Integer gender;

    /** 用户手机号 */
    @Excel(name = "用户手机号")
    private String phone;

    /** 用户登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loginTime;

    /** 用户登录IP */
    @Excel(name = "用户登录IP")
    private String loginIp;

    private  String role;

    private String aplUuid;

    private String fatherId;

    private  String name;

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    private  String merchantId;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOpenid(String openid)
    {
        this.openid = openid;
    }

    public String getOpenid()
    {
        return openid;
    }
    public void setAccountBlance(BigDecimal accountBlance)
    {
        this.accountBlance = accountBlance;
    }

    public BigDecimal getAccountBlance()
    {
        return accountBlance;
    }
    public void setNickname(String nickname)
    {
        this.nickname = nickname;
    }

    public String getNickname()
    {
        return nickname;
    }
    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAvatar()
    {
        return avatar;
    }
    public void setGender(Integer gender)
    {
        this.gender = gender;
    }

    public Integer getGender()
    {
        return gender;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setLoginTime(Date loginTime)
    {
        this.loginTime = loginTime;
    }

    public Date getLoginTime()
    {
        return loginTime;
    }
    public void setLoginIp(String loginIp)
    {
        this.loginIp = loginIp;
    }

    public String getLoginIp()
    {
        return loginIp;
    }
    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getAplUuid() {
        return aplUuid;
    }
    public String getFatherId() {
        return fatherId;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void setFatherId(String fatherId) {
        this.fatherId = fatherId;
    }
    public void setAplUuid(String aplUuid) {
        this.aplUuid = aplUuid;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("openid", getOpenid())
            .append("accountBlance", getAccountBlance())
            .append("nickname", getNickname())
            .append("avatar", getAvatar())
            .append("gender", getGender())
            .append("phone", getPhone())
            .append("loginTime", getLoginTime())
            .append("loginIp", getLoginIp())
            .append("createTime", getCreateTime())
            .toString();
    }
}
